xen.git
19 years agoPV-to-HVM: Add a compatibility define for the end_that_request_last
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-to-HVM: Add a compatibility define for the end_that_request_last
which changed prototype in 2.6.16.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Include compatibility kzalloc implementation for kernels
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Include compatibility kzalloc implementation for kernels
before 2.6.14.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-to-HVM: Impletement compatibility version of
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-to-HVM: Impletement compatibility version of
schedule_timeout_interruptible for kernels before 2.6.14

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Implement and export a compatibility version of do_exit().
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Implement and export a compatibility version of do_exit().
Kernels prior to 2.6.12 did not export do_exit().

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Implement compatibilty version of wait_for_completion_timeout
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Implement compatibilty version of wait_for_completion_timeout
for kernels before 2.6.11

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoPV-on-HVM: Include compatability vmalloc_to_pfn for kernels before 2.6.10
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Include compatability vmalloc_to_pfn for kernels before 2.6.10

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Kernels prior to 2.6.8 did not export strcspn to modules
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Kernels prior to 2.6.8 did not export strcspn to modules
therefore implement our own and export it.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Define system_state as 1 (SYSTEM_RUNNING) on kernels prior
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Define system_state as 1 (SYSTEM_RUNNING) on kernels prior
to 2.6.7. These kernels did not export the system_state variable to
modules.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoPV-to-HVM: Implement compatibility nonseekable_open as a nop on
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-to-HVM: Implement compatibility nonseekable_open as a nop on
kernels before 2.6.9

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoPV-to-HVM: Add compatibility definitions of various #defines when they
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-to-HVM: Add compatibility definitions of various #defines when they
are not present in the kernel we are building against.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Include compatability headers for asm/pgtable-no{pmd,pud}.h
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Include compatability headers for asm/pgtable-no{pmd,pud}.h
for kernels before 2.6.11.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Add a compatibility linux/mutex.h for kernels before
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Add a compatibility linux/mutex.h for kernels before
2.6.16.  This implements the new mutex type in terms of the old
semaphore type.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Add a compatibility linux/io.h for kernels before 2.6.16
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Add a compatibility linux/io.h for kernels before 2.6.16

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years agoPV-on-HVM: Add infrastructure for a compatibility shim in order to
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Add infrastructure for a compatibility shim in order to
support PV-on-HVM drivers for older kernel releases.

The compatability code is included in the xen-platform-pci module
since this module underpins all the others.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] PV-on-HVM: The elevator_init prototype changed in 2.6.10
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: The elevator_init prototype changed in 2.6.10

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] PV-on-HVM: Implement HDIO_GETGEO ioctl on kernels before
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: Implement HDIO_GETGEO ioctl on kernels before
2.6.16.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] PV-on-HVM: The probe, remove and shutdown methods were added
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: The probe, remove and shutdown methods were added
to struct bus_type in 2.6.16. For older kernels use the methods on the
struct device_driver.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] PV-on-HVM: Only initialize the owner field of struct
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: Only initialize the owner field of struct
device_driver on kernels from 2.6.10 onward. The field was not
available until then.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] Exclude support for /proc/xen/xsd_kva when building a
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] Exclude support for /proc/xen/xsd_kva when building a
non-privileged guest.

This is useful for PV-on-HVM because it removes code which would
otherwise require extra code in the compatability shim.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years ago[LINUX] PV-on-HVM: Remove the attr parameter from device attribute
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: Remove the attr parameter from device attribute
show methods on kernels prior to 2.6.13. The parameter was not present
before that.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] Move xenbus backend probing into a separate source file and
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] Move xenbus backend probing into a separate source file and
only build it when CONFIG_XEN_BACKEND is set.

This removes unused code from frontend only configurations and also
makes PV-on-HVM drivers on older kernels simpler by removing code
which would otherwise require extra code in the compatability shim.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoPV-on-HVM: Include a Makefile in each subdirectory to maintain
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
PV-on-HVM: Include a Makefile in each subdirectory to maintain
compatability with kernels from before Kbuild files were introduced.

This follows best practice as described in
Documentation/kbuild/modules.txt

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
19 years ago[LINUX] PV-on-HVM: Directly include headers which are used in various
Ian Campbell [Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)]
[LINUX] PV-on-HVM: Directly include headers which are used in various
files rather than relying on them being included indirectly.

This is required because these headers are not pulled in indirectly on
older kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years ago[XEN] Make memory hypercalls NUMA-aware.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 11:30:08 +0000 (12:30 +0100)]
[XEN] Make memory hypercalls NUMA-aware.

This patch modifies memory ops to use the NUMA-aware page allocator
functions.  We use the target domain's VCPU0 placement to determine
which node's memory to use.  We expect the system administrator to
utilize the exposed NUMA topology information to help craft guest
config files that are NUMA-friendly (use only processors and memory values
that will fit within a given node).

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
19 years ago[XEN] NUMA-ify Xen heap and page allocator
kfraser@localhost.localdomain [Wed, 25 Oct 2006 11:28:46 +0000 (12:28 +0100)]
[XEN] NUMA-ify Xen heap and page allocator

This patch adds a per-node bucket to the heap structure in Xen.
During heap initialization the patch determines which bucket to place
the memory. We reserve guard pages between node boundaries in the case
that said boundary isn't already guarded by the MAX_ORDER boundary to
prevent the buddy allocator from merging pages between nodes.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
19 years ago[XEN] Add basic NUMA/SRAT support to Xen from Linux 2.6.16.29.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 11:25:54 +0000 (12:25 +0100)]
[XEN] Add basic NUMA/SRAT support to Xen from Linux 2.6.16.29.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
19 years agomerge
kfraser@localhost.localdomain [Wed, 25 Oct 2006 10:51:23 +0000 (11:51 +0100)]
merge

19 years ago[HVM] Move ACPI timer to HV, which is the last platform timer in Qemu.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 10:50:54 +0000 (11:50 +0100)]
[HVM] Move ACPI timer to HV, which is the last platform timer in Qemu.

We found Vista polls ACPI timer very frequently (about 15 times
averagely) when handling timer (RTC @ 64HZ) interrupt routine. Though
the exact reason is known, it should be related to system time
adjustment. When it's in Qemu, the overhead is big. After moving,
Vista's idle overhead decreases dramatically from ~10% to 0.9%.=20

Another benefit is that Vista can only pass Performance rating with
this patch. The root cause is that ACPI timer in Qemu isn't
synchronous with other platform timer in HV, which results in Vista
complains "can't measure TSC frequency".

This patch changes vpit.h to vpt.h, for it not only has pit structure
in it, but other platform timer's structure. Another change is moving
ACPI timer and related address from acpi.h to ioreq.h, which can be shared
by HV and ACPI firmware.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
19 years ago[XEND] Be more generous with the default shadow allocation.
Tim Deegan [Wed, 25 Oct 2006 10:44:58 +0000 (11:44 +0100)]
[XEND] Be more generous with the default shadow allocation.
Allow enough shadow memory to avoid thrashing the shadow pages,
rather than just enough for safety.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[HVM] Avoid buffer overrun in qemu-dm
Tim Deegan [Wed, 25 Oct 2006 10:39:57 +0000 (11:39 +0100)]
[HVM] Avoid buffer overrun in qemu-dm
The array offset in set_bits_in_row here comes from an otherwise un-checked
VNC client request.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[BLOCK] blkback: Fix potential grant entry leaks on error
kfraser@localhost.localdomain [Wed, 25 Oct 2006 09:59:00 +0000 (10:59 +0100)]
[BLOCK] blkback: Fix potential grant entry leaks on error

As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[BLKTAP] Simplify linked-list insertion/deletion.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 09:56:50 +0000 (10:56 +0100)]
[BLKTAP] Simplify linked-list insertion/deletion.
This should also avoid (bogus) compiler warnings, as reported
on IA64.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEND] Open xend-debug.log in append mode.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 09:27:03 +0000 (10:27 +0100)]
[XEND] Open xend-debug.log in append mode.
Signed-off-by: John Levon <john.levon@sun.com>
19 years ago[TOOLS][XENTOP] Update usage and manpage to include vbd options.
kfraser@localhost.localdomain [Wed, 25 Oct 2006 09:25:18 +0000 (10:25 +0100)]
[TOOLS][XENTOP] Update usage and manpage to include vbd options.

Also a couple of whitespace fixes.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoAdd x86_64 to the supported architectures since otherwise the tests
Ewan Mellor [Tue, 24 Oct 2006 15:46:02 +0000 (16:46 +0100)]
Add x86_64 to the supported architectures since otherwise the tests
don't run.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix Memory assumptions in the create tests.
Ewan Mellor [Tue, 24 Oct 2006 13:52:20 +0000 (14:52 +0100)]
Fix Memory assumptions in the create tests.

Use the architecture specified idea of minimum memory.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years ago[qemu patches] Update patches upto changeset 11870:29b02d929b7e.
Christian Limpach [Tue, 24 Oct 2006 13:48:06 +0000 (14:48 +0100)]
[qemu patches] Update patches upto changeset 11870:29b02d929b7e.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
19 years agoThis puts two small fixes in the xm-test suite:
Ewan Mellor [Tue, 24 Oct 2006 13:47:41 +0000 (14:47 +0100)]
This puts two small fixes in the xm-test suite:
- it turns off verbose mode of the ACM module
- copies the test policy to the policies directory only if the directory
has been created

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoAdded multiarch support to xm-test. Bumped version number to xm-test 1.0.
Ewan Mellor [Tue, 24 Oct 2006 13:47:17 +0000 (14:47 +0100)]
Added multiarch support to xm-test.  Bumped version number to xm-test 1.0.
New README for public ramdisks.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoUpdate buildroot configs to match snapshot downloaded for public ramdisks.
Ewan Mellor [Tue, 24 Oct 2006 13:46:23 +0000 (14:46 +0100)]
Update buildroot configs to match snapshot downloaded for public ramdisks.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoIgnore more build-time files for xm-test.
Ewan Mellor [Tue, 24 Oct 2006 13:44:55 +0000 (14:44 +0100)]
Ignore more build-time files for xm-test.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoDefault to appending to "extra" in XenConfig.
Ewan Mellor [Mon, 23 Oct 2006 09:17:10 +0000 (10:17 +0100)]
Default to appending to "extra" in XenConfig.

PowerPC needs console information from the command line.  Resetting the whole
command line causes false failures.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoIgnore generated .test files.
Ewan Mellor [Mon, 23 Oct 2006 09:16:48 +0000 (10:16 +0100)]
Ignore generated .test files.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoAdd ability to inspect messages from domain for arbitrary strings.
Ewan Mellor [Mon, 23 Oct 2006 09:16:20 +0000 (10:16 +0100)]
Add ability to inspect messages from domain for arbitrary strings.

Used on PowerPC to FAIL(), if the guest domain hits a BUG() and enters XMON.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoAdd configuration data for powerpc.
Ewan Mellor [Mon, 23 Oct 2006 09:15:39 +0000 (10:15 +0100)]
Add configuration data for powerpc.

Allows for building of initrd, and running of tests.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoRefactor code to encapsulate architecture decisions in one place.
Ewan Mellor [Mon, 23 Oct 2006 09:14:13 +0000 (10:14 +0100)]
Refactor code to encapsulate architecture decisions in one place.

Also includes some whitespace fixes.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoUpdate .hgignore to remove artifacts of ramdisk build.
Ewan Mellor [Mon, 23 Oct 2006 09:09:40 +0000 (10:09 +0100)]
Update .hgignore to remove artifacts of ramdisk build.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years agoRename buildroot -> buildroot-i386.
Ewan Mellor [Mon, 23 Oct 2006 09:07:15 +0000 (10:07 +0100)]
Rename buildroot -> buildroot-i386.

Also update Makefile.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
19 years ago[XEN] Remove definition of printf. All users are switched to printk.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 13:42:52 +0000 (14:42 +0100)]
[XEN] Remove definition of printf. All users are switched to printk.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLKTAP] Do not allocate a descriptor for blktap control device
kfraser@localhost.localdomain [Mon, 23 Oct 2006 13:19:14 +0000 (14:19 +0100)]
[BLKTAP] Do not allocate a descriptor for blktap control device
(minor 0).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years ago[BLKTAP] Only allocate tapfd descriptors when they are requested.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 13:18:16 +0000 (14:18 +0100)]
[BLKTAP] Only allocate tapfd descriptors when they are requested.

Currently all are allocated at bootup, even when they will never be used.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years ago[BALLOON] Add a sysfs interface.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 13:09:01 +0000 (14:09 +0100)]
[BALLOON] Add a sysfs interface.
Information is located under /sys/devices/system/memory.

Original patch from Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Fill in runstate_info when virtual address is registered,
kfraser@localhost.localdomain [Mon, 23 Oct 2006 12:10:24 +0000 (13:10 +0100)]
[XEN] Fill in runstate_info when virtual address is registered,
even when it is registered from the 'wrong' VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XM] Print qualified path to config file on domain creation.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 11:43:32 +0000 (12:43 +0100)]
[XM] Print qualified path to config file on domain creation.
From: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAllow domain config file to specify credit-scheduler parameters.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 11:28:33 +0000 (12:28 +0100)]
Allow domain config file to specify credit-scheduler parameters.
Signed-off-by: Masami Watanabe <masami.watanabe@jp.fujitsu.com>
19 years ago[XM] Allow empty resource strings (e.g., when creating an empty CDROM
kfraser@localhost.localdomain [Mon, 23 Oct 2006 11:23:57 +0000 (12:23 +0100)]
[XM] Allow empty resource strings (e.g., when creating an empty CDROM
device). Also clean up error/acces-denied path.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] No need to call hvm_do_resume() on every vm entry.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 10:46:41 +0000 (11:46 +0100)]
[HVM] No need to call hvm_do_resume() on every vm entry.
Original patch from Xin Li <xin.b.li@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] back: Fix packet queuing so that packets are drained if the
kfraser@localhost.localdomain [Mon, 23 Oct 2006 10:20:37 +0000 (11:20 +0100)]
[NET] back: Fix packet queuing so that packets are drained if the
interface is blocked for longer than 500ms. This avoids deadlock
situations where interfaces cannot be destroyed because some other
dormant interface is holding resources.

Signed-off-by: Christopher Clark <christopher.clark@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLOCK] blkback: Fix first_sect check.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 09:05:32 +0000 (10:05 +0100)]
[BLOCK] blkback: Fix first_sect check.

The blkback code checks first_sect by computing last_sect - first_sect
+ 1. If this is not positive then the request is
rejected. Unfortunately, the calculation is stored in an unsigned
integer before the check is made so negative values will not be
rejected.

This patch fixes this by explicitly comparing first_sect with
last_sect.

The blktap code is similar but it stores the difference in a signed
integer so it's okay.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[BLOCK] blkback: Copy shared data before verification
kfraser@localhost.localdomain [Mon, 23 Oct 2006 09:00:14 +0000 (10:00 +0100)]
[BLOCK] blkback: Copy shared data before verification

As it is blkback verifies the metadata from the frontend in place.
This means we run the risk of the frontend changing the data after
we've verified it.  This patch copies the data onto the stack before
verifying and using it to ensure we see a consistent snapshot.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[ACM] Don't use uninitialised struct value if hypercall fails.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 08:57:24 +0000 (09:57 +0100)]
[ACM] Don't use uninitialised struct value if hypercall fails.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[SOLARIS] Don't mlock() hypercall buffers.
kfraser@localhost.localdomain [Mon, 23 Oct 2006 08:52:51 +0000 (09:52 +0100)]
[SOLARIS] Don't mlock() hypercall buffers.

On solaris mlock requires a page aligned address and mlock doesn't
ensure the pages won't minor page fault.

Signed-off-by: Mark Johnson <mark.johnson@sun.com>
19 years agoFree correct number of maptack pages during domain destruction.
kaf24@localhost.localdomain [Sun, 22 Oct 2006 16:38:59 +0000 (17:38 +0100)]
Free correct number of maptack pages during domain destruction.
Signed-off-by: Christopher Clark <christopher.clark@cl.cam.ac.uk>
19 years agoUse $CC when building pygrub.
kaf24@localhost.localdomain [Sun, 22 Oct 2006 16:36:28 +0000 (17:36 +0100)]
Use $CC when building pygrub.
Signed-off-by: John Levon <john.levon@sun.com>
19 years ago[HVM] Replace hvm_prod_vcpu() with calls to generic (and correct) vcpu_kick().
kaf24@localhost.localdomain [Sun, 22 Oct 2006 16:34:24 +0000 (17:34 +0100)]
[HVM] Replace hvm_prod_vcpu() with calls to generic (and correct) vcpu_kick().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Don't compare CR3 pfn to domain->max_pages
Tim Deegan [Fri, 20 Oct 2006 16:52:32 +0000 (17:52 +0100)]
[HVM] Don't compare CR3 pfn to domain->max_pages
max_pages is the largest number of pages the domain can have
allocated, not the gpfn of the highest one.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[XEN] Stricter TLB-flush discipline when unshadowing pagetables
Tim Deegan [Fri, 20 Oct 2006 15:06:53 +0000 (16:06 +0100)]
[XEN] Stricter TLB-flush discipline when unshadowing pagetables
It's OK for the guest to see old entries in the TLB, but not for the
shadow fault handler to see them in its linear mappings.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[XEN] Show shadow status of vcpus in domain info dump
Tim Deegan [Fri, 20 Oct 2006 15:01:49 +0000 (16:01 +0100)]
[XEN] Show shadow status of vcpus in domain info dump
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years agoOmit seg fixup warning if it's just from statically linked init.
Steven Hand [Fri, 20 Oct 2006 10:49:00 +0000 (11:49 +0100)]
Omit seg fixup warning if it's just from statically linked init.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years agoWorkaround for bigsmp APIC mode SMP linux guests - we cannot correctly deal
Steven Hand [Fri, 20 Oct 2006 10:43:14 +0000 (11:43 +0100)]
Workaround for bigsmp APIC mode SMP linux guests - we cannot correctly deal
with timer interrupts being delivered to VCPUs other than 0, so spit a
warning and then subsequently ignore the target. This fixes the recent
issues Intel reported when booting SMP FC5 and FC6 kernels.

Needs a better fix at some point.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years ago[XEND] Remove lazy import of signal module.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 10:00:08 +0000 (11:00 +0100)]
[XEND] Remove lazy import of signal module.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
19 years agoAllow default target architecture of PV-on-HVM drivers to be overridden.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:58:15 +0000 (10:58 +0100)]
Allow default target architecture of PV-on-HVM drivers to be overridden.
Signed-off-by: Travis Betak <travis.betak@amd.com>
19 years ago[ACM] Documentation cleanup.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:48:34 +0000 (10:48 +0100)]
[ACM] Documentation cleanup.

This patch eliminates redundant security tools information that was
integrated into the Xen user guide and the xm man page.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>

19 years ago[NET] gso: Fix rcv mss estimate
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:46:37 +0000 (10:46 +0100)]
[NET] gso: Fix rcv mss estimate

I noticed that with default TCP window sizes TSO + Xen would slow to a
crawl on certain machines.  It turned out that there is a bug in the
TCP stack when it comes to receiving LRO (counter part of TSO for rx)
packets.

The following fix has been applied upstream.

        [TCP]: Fix rcv mss estimate for LRO

        By passing a Linux-generated TSO packet straight back into
        Linux, Xen
        becomes our first LRO user :) Unfortunately, there is at least
        one spot
        in our stack that needs to be changed to cope with this.

        The receive MSS estimate is computed from the raw packet
        size.  This is
        broken if the packet is GSO/LRO.  Fortunately the real MSS can
        be found
        in gso_size so we simply need to use that if it is non-zero.

        Real LRO NICs should of course set the gso_size field in
        future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[HVM] Fix oprofile for HVM guests.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:34:24 +0000 (10:34 +0100)]
[HVM] Fix oprofile for HVM guests.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][SVM] Avoid double-execution of NMI handler.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:11:45 +0000 (10:11 +0100)]
[HVM][SVM] Avoid double-execution of NMI handler.

Remove the do_nmi() call from the vmexit logic, as the NMI is held
pending and will be handled in the context of the host when the STGI
instruction is executed.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years ago[HVM][SVM] Fix 2/2 to nterrupt delivery logic.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:10:36 +0000 (10:10 +0100)]
[HVM][SVM] Fix 2/2 to nterrupt delivery logic.

Add flag to indicate that an exception event needs injecting, and to
delay the ext interrupt injection.
Remove unnecessary check of RFLAGS.IF for ExtInt injection.

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years ago[HVM][SVM] Fix 1/2 to interrupt delivery logic.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 09:09:55 +0000 (10:09 +0100)]
[HVM][SVM] Fix 1/2 to interrupt delivery logic.

This patch uses the VINTR intercept to signal the hypervisor when a
guest can take an interrupt.  When guest's interrupts are masked by
EFLAGS.IF or the guests are in an interrupt shadow, we create a 'fake'
virtual interrupt to inject while also enabling the VINTR intercept.
When the guest _can_ take interrupts, the hypervisor will #VMEXIT
on VINTR. The VINTR exit handler then clears the VINTR intercept bit
and clears the V_IRQ bit so that svm_intr_assist() can inject a
legitimate interrupt.

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years ago[HVM] Implement password authentication of VNC connections.
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:50:09 +0000 (09:50 +0100)]
[HVM] Implement password authentication of VNC connections.

The specification is as mentioned at
http://lists.xensource.com/archives/html/xen-devel/2006-09/msg00666.html
(However, password came to describe plain text)

The difference is follows.
- protocol_authtype() without the necessity was deleted.
- The check on the protocol version was added.
- And, some small modification.

Signed-off-by: Masami Watanabe <masami.watanabe@jp.fujitsu.com>
19 years agoUse the name of the title of the system to boot into (instead of the
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:32:16 +0000 (09:32 +0100)]
Use the name of the title of the system to boot into (instead of the
kernel version) to determine where to make the entry into the grub
configuration file.

Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years ago[HVM] Pass all non-RAM memory accesses to handle_mmio().
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:30:23 +0000 (09:30 +0100)]
[HVM] Pass all non-RAM memory accesses to handle_mmio().

It is up to handle_mmio() to correctly handle accesses outside
valid device mmio regions.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLKTAP]: Fix potential grant entry leaks on error
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:28:31 +0000 (09:28 +0100)]
[BLKTAP]: Fix potential grant entry leaks on error

As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

There is still a potential leak if create_lookup_pte_addr fails
in fast_flush_area.  This leak is not affected by this patch.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[BLKTAP]: Kill bogus fast_flush_area
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:24:26 +0000 (09:24 +0100)]
[BLKTAP]: Kill bogus fast_flush_area

The function dispatch_rw_block_io may call fast_flush_area even before
a pending request has been initialised.  This patch deletes that call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[BLKTAP]: Kill duplicate fast_flush_area call
kfraser@localhost.localdomain [Fri, 20 Oct 2006 08:22:58 +0000 (09:22 +0100)]
[BLKTAP]: Kill duplicate fast_flush_area call

The dispatch_rw_block_io may call fast_flush_area twice if
create_lookup_pte_addr fails (there is a flush call at fail_flush
already).  The second call simply causes warnings to be printed
on the console.  This patch removes the duplicate call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[VMXASSIST] Some reports that macros do not get picked up by CPP
kaf24@firebug.cl.cam.ac.uk [Thu, 19 Oct 2006 21:05:07 +0000 (22:05 +0100)]
[VMXASSIST] Some reports that macros do not get picked up by CPP
if they are prefixed with $. Fix by placing macro uses in ().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[SOLARIS] Don't use -nostdinc as it prevents getting stadrg.h
kfraser@localhost.localdomain [Thu, 19 Oct 2006 16:01:51 +0000 (17:01 +0100)]
[SOLARIS] Don't use -nostdinc as it prevents getting stadrg.h
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Windows HCT requires non-zero subvendor details in platform PCI device.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 15:32:11 +0000 (16:32 +0100)]
[HVM] Windows HCT requires non-zero subvendor details in platform PCI device.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
19 years ago[XEND] Two small fixes/improvements from Glauber de Oliveira Costa.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 14:53:12 +0000 (15:53 +0100)]
[XEND] Two small fixes/improvements from Glauber de Oliveira Costa.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Use CPUID instruction virtualization to workaround VMXAssist 4G limit.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 14:49:16 +0000 (15:49 +0100)]
[HVM][VMX] Use CPUID instruction virtualization to workaround VMXAssist 4G limit.

Address space access limit in VMXAssist is 4G, because IA-32 only has
4GB virtual address space which VMXassist can use to map physical
memory. The issue is, win2k3 server with more than 4G memory will put
AP GDT above 4G, so when AP changes its mode from real mode to PAE
paging mode, the long jump instrction it uses need access AP GDT
entries which resides above 4G, but because of this constraint, it can
not access GDT and so fails boot.

Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[ACM] An environment where ACM and its tools have not been installed before
kfraser@localhost.localdomain [Thu, 19 Oct 2006 14:15:36 +0000 (15:15 +0100)]
[ACM] An environment where ACM and its tools have not been installed before
will throw an error during 'make' of the test suite. This fixes the problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years ago[ACM] Add missing alignment operations for the ACM module.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 14:14:25 +0000 (15:14 +0100)]
[ACM] Add missing alignment operations for the ACM module.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoDon't use $(LINK.o), as it doesn't pick up -m32/-m64 from $(CFLAGS).
kfraser@localhost.localdomain [Thu, 19 Oct 2006 14:13:09 +0000 (15:13 +0100)]
Don't use $(LINK.o), as it doesn't pick up -m32/-m64 from $(CFLAGS).

Signed-off-by: John Levon <john.levon@sun.com>
19 years ago[HVM] PCmark2005 running in WinXP needs following extension to mmio decoder.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 13:56:02 +0000 (14:56 +0100)]
[HVM] PCmark2005 running in WinXP needs following extension to mmio decoder.

Als fix some inconsistencies, the comments of mmio decoder use AT&T
ordering for operands, but the syntax looks like Intel asm. This leads
to much confusion.

Signed-off-by: Qing He <qing.he@intel.com>
19 years ago[XENTRACE] Fix typo in set_cpu_mask op.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 13:53:31 +0000 (14:53 +0100)]
[XENTRACE] Fix typo in set_cpu_mask op.
From: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLKTAP]: Copy shared data before verification
kfraser@localhost.localdomain [Thu, 19 Oct 2006 13:50:47 +0000 (14:50 +0100)]
[BLKTAP]: Copy shared data before verification

As it is blktap verifies the metadata from the frontend in place.
This means we run the risk of the frontend changing the data after
we've verified it.  This patch copies the data onto the stack before
verifying and using it to ensure we see a consistent snapshot.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[XEN] Forcibly undefine swap{16,32,64} in mkelf32 program.
kfraser@localhost.localdomain [Thu, 19 Oct 2006 13:38:34 +0000 (14:38 +0100)]
[XEN] Forcibly undefine swap{16,32,64} in mkelf32 program.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] front: Fix "rmmod xennet" crash in dom0.
kfraser@localhost.localdomain [Wed, 18 Oct 2006 18:23:32 +0000 (19:23 +0100)]
[NET] front: Fix "rmmod xennet" crash in dom0.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
19 years ago[HVM] XenTrace enhancement for HVM SMP guests.
kfraser@localhost.localdomain [Wed, 18 Oct 2006 18:20:36 +0000 (19:20 +0100)]
[HVM] XenTrace enhancement for HVM SMP guests.

Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years agoReplace test-gcc-flag with Linux-style cc-option.
kfraser@localhost.localdomain [Wed, 18 Oct 2006 18:14:34 +0000 (19:14 +0100)]
Replace test-gcc-flag with Linux-style cc-option.

Improve on Linux implementation by looking for any output
on stdout/stderr. This indicates badness.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Enable DMA mode for CD-ROM IDE ATAPI interface.
kfraser@localhost.localdomain [Wed, 18 Oct 2006 17:41:47 +0000 (18:41 +0100)]
[HVM] Enable DMA mode for CD-ROM IDE ATAPI interface.
Signed-off-by: Winston Wang <winston.l.wang@intel.com